package Demo;
//Calendar类的成员方法

import java.util.Calendar;

public class Demo02Calendar {
    public static void main(String[] args) {
        demo01();

    }
    private static void demo01(){
        Calendar c = Calendar.getInstance();
        int year = c.get(Calendar.YEAR);
        System.out.println(year);

        int month = c.get(Calendar.MONTH);
        System.out.println(month + 1);

        int date = c.get(Calendar.DATE);
        System.out.println(date);
    }
}

